package com.io.input;

import java.io.IOException;
import java.io.StringReader;

public class MemoryInput {

	public static void main(String[] args) throws IOException {
		StringReader in = new StringReader(
				BufferedInputFile
						.read("F:/workspace_luna/demo_thinkinjava/src/com/io/input/BufferedInputFile.java"));

		int c;
		while ((c = in.read()) != -1) {
			// read是以int返回下一个字节，所以要用char转型输出
			System.out.print((char) c);
		}
	}

}
